<?php

/**
 * @author shuang
 * @date 2016-10-26 14:05:24
 */
use yii\helpers\ArrayHelper;
use frontend\models\WB_UserPayRecord;
use yii\helpers\Url;

$this->registerCssFile("/css/validate.css");
$this->registerCssFile("/js/ui-dialog.css");
$this->registerCssFile("/css/jquery.datatables.css");
$this->registerJsFile("/js/dialog-plus-min.js", [\yii\web\JqueryAsset::className(), "depends" => "\yii\web\JqueryAsset"]);
$this->registerJsFile("/js/jquery.zclip.min.js", [\yii\web\JqueryAsset::className(), "depends" => "\yii\web\JqueryAsset"]);
echo $this->render("//layouts/breadcrumb", ["url" => Url::toRoute(["account/payinfo"]), "title" => "充值明细"]);
?>
<div class="container-fluid">
    <div class="row-fluid">
        <div class="span12 well ibox float-e-margins">
            <div class="ibox-title">充值明细 </div>
            <div class="well-content ibox-content">
                <div class="table-responsive">
                    <div id="table1_wrapper" class="dataTables_wrapper no-footer">

                        <table id="table1" class="table dataTable no-footer" role="grid" aria-describedby="table1_info">
                            <thead>
                                <tr role="row">
                                    <th style="width: 10%" aria-sort="ascending">类别</th>
                                    <th style="width: 10%">金额</th>
                                    <th style="width: 50%">描述</th>
                                    <th style="width: 30%">创建时间</th>
                                </tr>
                            </thead>
                            <tbody>
                                <?php foreach ($data as $item): ?>
                                    <tr class="gradeA odd" role="row">
                                        <td class="sorting_1"><?php echo ArrayHelper::getValue(WB_UserPayRecord::$class_type, $item["class_type"] . ".classnote"); ?></td>
                                        <td><?php echo ArrayHelper::getValue($item, "amount"); ?>元</td>
                                        <td><?php echo ArrayHelper::getValue($item, "description"); ?></td>
                                        <td class="center"><?php echo date("Y-m-d H:i:s", ArrayHelper::getValue($item, "created_at")); ?></td>
                                    </tr>
                                <?php endforeach; ?>
                            </tbody>
                        </table>
                    </div>
                    <div class="pagination" style="float:right;">
                        <?php
                        echo
                        \yii\widgets\LinkPager::widget([
                            'pagination' => $pager,
                            'nextPageLabel' => '下一页',
                            'prevPageLabel' => '上一页',
                        ]);
                        ?>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>